]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Use the bottom monitor's fullscreen state for rate limiting
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 11 Mar 2013 19:57:32 +0000 (15:57 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 12 Mar 2013 15:58:51 +0000 (11:58 -0400)
It makes more sense to use the monitor the tray is on, rather than the
primary monitor. This also matches us with whether we can open the tray
from a barrier/dwell or not.

https://bugzilla.gnome.org/show_bug.cgi?id=695659

js/ui/layout.js
js/ui/messageTray.js

index 381676dc4eef3b89a09c7338dd9e1c2b3862df18..4ca2680a999103954352671e8f560646e4ec6eda 100644 (file)
@@ -976,8 +976,9 @@ const LayoutManager = new Lang.Class({
                     !metaWindow.appears_focused)
                     metaWindow.minimize();
             }
-            this.emit('primary-fullscreen-changed', this.primaryMonitor.inFullscreen);
         }
+
+        this.emit('fullscreen-changed');
     },
 
     _updateRegions: function() {
index 0b1b50253b4a2f0ee0247544537255752af1b282..1f4c555e17d4b31b7533682c9bcd4e74f24044fd 100644 (file)
@@ -1670,7 +1670,7 @@ const MessageTray = new Lang.Class({
         Main.layoutManager.trackChrome(this._notificationWidget);
         Main.layoutManager.trackChrome(this._closeButton);
 
-        Main.layoutManager.connect('primary-fullscreen-changed', Lang.bind(this, this._onFullscreenChanged));
+        Main.layoutManager.connect('fullscreen-changed', Lang.bind(this, this._updateState));
         Main.layoutManager.connect('hot-corners-changed', Lang.bind(this, this._hotCornersChanged));
 
         // If the overview shows or hides while we're in
@@ -2169,11 +2169,6 @@ const MessageTray = new Lang.Class({
         this._updateState();
     },
 
-    _onFullscreenChanged: function(obj, state) {
-        this._inFullscreen = state;
-        this._updateState();
-    },
-
     _onStatusChanged: function(status) {
         if (status == GnomeSession.PresenceStatus.BUSY) {
             // remove notification and allow the summary to be closed now
@@ -2232,7 +2227,7 @@ const MessageTray = new Lang.Class({
         let notificationQueue = this._notificationQueue;
         let notificationUrgent = notificationQueue.length > 0 && notificationQueue[0].urgency == Urgency.CRITICAL;
         let notificationForFeedback = notificationQueue.length > 0 && notificationQueue[0].forFeedback;
-        let notificationsLimited = this._busy || this._inFullscreen;
+        let notificationsLimited = this._busy || Main.layoutManager.bottomMonitor.inFullscreen;
         let notificationsPending = notificationQueue.length > 0 && (!notificationsLimited || notificationUrgent || notificationForFeedback) && Main.sessionMode.hasNotifications;
         let nextNotification = notificationQueue.length > 0 ? notificationQueue[0] : null;
         let notificationPinned = this._pointerInTray && !this._pointerInSummary && !this._notificationRemoved;